//渲染
//http://10.31.163.70/jsitem/projectname/php/list.php
import "https://cdn.bootcdn.net/ajax/libs/jquery/1.12.4/jquery.min.js";

function renderlist() {
    $.ajax({
        url: 'http://10.31.163.70/jsitem/projectname/php/list.php',
        dataType: 'json',
    }).done(function (obj) {
        let arrData = obj.pagecontent;
        let size = pagesize;
        //渲染拼接
        let str = '';
        $each(arrData, function (index, value) {
            str += `
            <li>
                <a href="">
                    <img src="${value.url}" alt="">
                    <p>${value.title}</p>
                    <span>${value.price}</span>
                    <span>${value.sailnumber}</span>
                </a>
            </li>
            `;
        })
        $('.list ul').html(str);
    })
}
export {
    renderlist
}